﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProgrammingEducationSystem.Models
{
    //课程类型
    public class CourseType
    {
        public Guid Id { get; set; }

        [Required(ErrorMessage = "课程Id不可为空")]
        [ForeignKey(nameof(Course))]
        public Guid CourseId { get; set; }
        public Course Course { get; set; }

        [Required(ErrorMessage = "课程类型名称不可为空")]
        public string Name { get; set; }    

        public List<LearnSource> learnSources { get; set; }
    }
}
